#FROM gitlab.jnhgsz.com/openjdk/openjdk:8-jdk
#FROM eclipse-temurin:8u412-b08-fonts
FROM openjdk:8-jdk-alpine

MAINTAINER liuliyou

# 设置时区为东八区
ENV TimeZone=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TimeZone /etc/localtime && echo $TimeZone > /etc/timezone

ENV SERVER_PORT=8080
EXPOSE ${SERVER_PORT}

ADD ./supermarket.jar ./app.jar

ENTRYPOINT ["java", \
            "-Djava.security.egd=file:/dev/./urandom", \
            "-Dserver.port=${SERVER_PORT}", \
            "-jar", "app.jar"]
